<?xml version="1.0" encoding="utf-8" ?> 
<Feature id="Messaging" name="Messaging framework configuration">

	<Dependencies>
		<Dependency type="feature">BaseFrameworkFeature.xml</Dependency>
	</Dependencies>
	
	<Macro name="MessagingConnectionHome">$CatalogHome$/MessagingConnections</Macro>
	<Macro name="MessagingRequestDefinitionsHome">$CatalogHome$/MessagingRequestDefinitions</Macro>
	<Macro name="QueueExpiration">5 min</Macro>
	
	<ConfigurationClasses>
		<Class name="sysObjs-MessagingListenerMgr" type="Swaf.Messaging.MessagingListenerManager,SwafCore" />
	</ConfigurationClasses>
	
	<ClassFactory id="MessagingSystems">
		<Class type="Swaf.DataAccess.Messaging.MSMQHelper,SwafCore" name="MSMQ" />
	</ClassFactory>
	<ClassFactory id="MessagingConnections" />
	<ClassFactory id="MessageResolvers">
		<Class type="Swaf.Messaging.TextMessageResolver,SwafCore" name="Text" />
		<Class type="Swaf.DataAccess.Messaging.SOAPMessageResolver,SwafCore" name="SOAP" />
	</ClassFactory>
	<ClassFactory id="DataRequestTypes">
		<Class type="Swaf.DataAccess.Messaging.MessagingDataRequest,SwafCore" name="MessagingDataRequest" />
	</ClassFactory>
	<ClassFactory id="StringDataFormatters">
		<Class type="Swaf.DataAccess.Messaging.MessageBizObjFormatter,SwafCore">
			<Pattern>bizobj{ws}({1+ {anychar}})</Pattern>
		</Class>
		<Class type="Swaf.DataAccess.Messaging.MessageStringFormatter,SwafCore">
			<Pattern>text</Pattern>
		</Class>
	</ClassFactory>
	<ClassFactory id="CallTypes">
		<Class type="Swaf.Call.MessagingRuleMgrCall" name="MessagingRule" />
	</ClassFactory>
	
	<BusinessRules>
		<BusinessRule name="messagingListenerProcessMessage">
			<LocalClass name="Swaf.Messaging.MessagingListenerMessageProcessingRule,SwafCore" />
		</BusinessRule>
		<BusinessRule name="CsfMessagingProcessSingleMessage">
			<LocalClass name="Swaf.Messaging.MessagingRules,SwafCore" />
		</BusinessRule>
		<BusinessRule name="CsfMessagingMonitorQueue">
			<LocalClass name="Swaf.Messaging.MessagingRules,SwafCore" />
		</BusinessRule>
		<BusinessRule name="CsfMessagingStopMonitoringQueue">
			<LocalClass name="Swaf.Messaging.MessagingRules,SwafCore" />
		</BusinessRule>
	</BusinessRules>

	<!-- This section should be defined within the application config using the Messaging feature in order to register listeners.
	<MessagingListeners messagingSystem="MQ">
		<Listener source="$MQTestOutputQueue$" queueManager="$MQQueueManager$" connection="$MQConnection$" processingFailureQueue="$DeadLetterQueue$">
			<LocalClass name="TestMessageService.TestMessageHandler,TestMessageService.exe" method="processMessage" reply="true" />
			<Rule method="getMainUserView" />
		</Listener>
	</MessagingListeners>
    -->
	<ApplicationData>
		<Entry name="Messaging" nodeType="catalog from $MessagingConnectionHome$">
			Swaf.Messaging.ConnectionFactoryContainerNode,SwafCore</Entry>
		<Entry name="Messages" nodeType="catalog from $MessagingRequestDefinitionsHome$">
			use DataRequestTypes factory</Entry>
	</ApplicationData>
	
	<!-- This section may have to be defined within the application config if you are not using the Ado.Net feature.
	<ApplicationData>
		<Element name="Data" type="catalog from $CatalogHome$/DataRequestDefinitions">
			use DataRequestTypes factory</Element>
	</ApplicationData>
    -->
</Feature>